package com.ruoyi.project.system.service.impl;

import java.util.List;

import com.ruoyi.project.system.domain.SysSign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysMobileUserMapper;
import com.ruoyi.project.system.domain.SysMobileUser;
import com.ruoyi.project.system.service.ISysMobileUserService;

/**
 * 用户端appService业务层处理
 * 
 * @author jjp
 * @date 2020-04-13
 */
@Service
public class SysMobileUserServiceImpl implements ISysMobileUserService 
{
    @Autowired
    private SysMobileUserMapper sysMobileUserMapper;

    /**
     * 查询用户端app
     * 
     * @param mobileUserId 用户端appID
     * @return 用户端app
     */
    @Override
    public SysMobileUser selectSysMobileUserById(Long mobileUserId)
    {
        return sysMobileUserMapper.selectSysMobileUserById(mobileUserId);
    }

    @Override
    public SysMobileUser selectSysMobileUserByName(String userName) {
        return sysMobileUserMapper.selectSysMobileUserByName(userName);
    }

    /**
     * 查询用户端app列表
     * 
     * @param sysMobileUser 用户端app
     * @return 用户端app
     */
    @Override
    public List<SysMobileUser> selectSysMobileUserList(SysMobileUser sysMobileUser)
    {
        return sysMobileUserMapper.selectSysMobileUserList(sysMobileUser);
    }

    /**
     * 新增用户端app
     * 
     * @param sysMobileUser 用户端app
     * @return 结果
     */
    @Override
    public int insertSysMobileUser(SysMobileUser sysMobileUser)
    {
        return sysMobileUserMapper.insertSysMobileUser(sysMobileUser);
    }

    /**
     * 修改用户端app
     * 
     * @param sysMobileUser 用户端app
     * @return 结果
     */
    @Override
    public int updateSysMobileUser(SysMobileUser sysMobileUser)
    {
        return sysMobileUserMapper.updateSysMobileUser(sysMobileUser);
    }

    /**
     * 批量删除用户端app
     * 
     * @param mobileUserIds 需要删除的用户端appID
     * @return 结果
     */
    @Override
    public int deleteSysMobileUserByIds(Long[] mobileUserIds)
    {
        return sysMobileUserMapper.deleteSysMobileUserByIds(mobileUserIds);
    }

    /**
     * 删除用户端app信息
     * 
     * @param mobileUserId 用户端appID
     * @return 结果
     */
    @Override
    public int deleteSysMobileUserById(Long mobileUserId)
    {
        return sysMobileUserMapper.deleteSysMobileUserById(mobileUserId);
    }

    @Override
    public int changeIntegral(SysSign sysSign) {
        return sysMobileUserMapper.changeIntegral(sysSign);
    }

    @Override
    public SysMobileUser queryUserOpenId(String openId) {
        return sysMobileUserMapper.queryUserOpenId(openId);
    }
}
